
<!-- network virtual_networks -->
<script id="services.network.subscriptions.id.virtual_networks.partial" type="text/x-handlebars-template">
    <div id="resource-name" class="list-group-item active">
        <h4 class="list-group-item-heading">{{name}}</h4>
    </div>
    <div class="list-group-item">
        <h4 class="list-group-item-heading">Information</h4>
        <div class="list-group-item-text item-margin">Name: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.name"><samp>{{name}}</samp></span></div>
        <div class="list-group-item-text item-margin">Resource GUID: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.resource_guid"><samp>{{resource_guid}}</samp></span></div>
        <div class="list-group-item-text item-margin">Type: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.type"><samp>{{type}}</samp></span></div>
        <div class="list-group-item-text item-margin">Location: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.location"><samp>{{location}}</samp></span></div>
        <div class="list-group-item-text item-margin">Provisioning State: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.provisioning_state"><samp>{{provisioning_state}}</samp></span></div>
        <div class="list-group-item-text item-margin">Address Space: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.address_space"><samp>{{address_space.address_prefixes}}</samp></span></div>
        <div class="list-group-item-text item-margin">DHCP Options: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.dhcp_options"><samp>{{value_or_none dhcp_options}}</samp></span></div>
        <div class="list-group-item-text item-margin">Virtual Network Peerings: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.virtual_network_peerings"><samp>{{value_or_none virtual_network_peerings}}</samp></span></div>
        <div class="list-group-item-text item-margin">Enable VM Protection: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.enable_vm_protection"><samp>{{enable_vm_protection}}</samp></span></div>
        <div class="list-group-item-text item-margin">Enable DDoS Protection: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.enable_ddos_protection"><samp>{{enable_ddos_protection}}</samp></span></div>
        <div class="list-group-item-text item-margin">DDoS Protection Plan: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.ddos_protection_plan"><samp>{{value_or_none ddos_protection_plan}}</samp></span></div>
        <div class="list-group-item-text item-margin">Tags: 
            {{#each tags}}
                <div
                    style="border-radius: 5px; -webkit-border-radius: 5px; float: center; background-color: #c2c2d6; padding: 0.1px; text-align: center; display: inline-flex;">
                    <samp>{{value_or_none this}}</samp>
                </div>&nbsp;&nbsp;
            {{else}}
                <div style="display: inline-flex;"><samp>None</samp></div>
            {{/each}}
        </div>
        <div class="list-group-item-text item-margin">Resource group: <span id="network.subscriptions.{{@../key}}.virtual_networks.{{@key}}.resource_group_name"><samp>{{value_or_none resource_group_name}}</samp></span></div>
    </div>
    <div class="list-group-item">
        <h4 class="list-group-item-heading">Subnets</h4>
        {{#each subnets}}
        <div class="list-group-item-text item-margin">
            <span id="network.subscriptions.{{../subscription}}.virtual_networks.{{@../key}}.subnets.{{@key}}"><samp>{{getValueAt 'services.network.subscriptions' ../subscription 'virtual_networks' @../key 'subnets' this.id 'name'}}</samp></span>
            (<a id="network.subscriptions.{{../subscription}}.virtual_networks.{{@../key}}.subnets.{{@key}}.address_prefix" href="javascript:showObject('services.network.subscriptions.{{../subscription}}.virtual_networks.{{@../key}}.subnets.{{this.id}}')">{{getValueAt 'services.network.subscriptions' ../subscription 'virtual_networks' @../key 'subnets' this.id 'address_prefix'}}</a>)
        </div>
        {{/each}}
    </div>
</script>

<script>
    Handlebars.registerPartial("services.network.subscriptions.id.virtual_networks", $("#services\\.network\\.subscriptions\\.id\\.virtual_networks\\.partial").html());
</script>

<!-- Single network virtual_network template -->
<script id="single_network_virtual_network-template" type="text/x-handlebars-template">
    {{> modal-template template='services.network.subscriptions.id.virtual_networks'}}
</script>
<script>
    var single_network_virtual_network_template = Handlebars.compile($("#single_network_virtual_network-template").html());
</script>
